<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pe="http://primefaces.org/ui/extensions" >
<h:head>
	<title>Travel Package Detail</title>
</h:head>
<h:body>
	<h:link value="PERSONAL HOME" outcome="index" />
 	<h:form id="formDetail">
	<p:panel id="panelDetailPackage" header="Travel package detail">  
        <h:panelGrid columns="2">
			<h:outputLabel value="ID: "></h:outputLabel>
			<h:outputLabel id="id" value="#{detailCustomerPackage.travelPackage.id}" />
			
			<h:outputLabel value="Feasible reservations: "></h:outputLabel>
			<h:outputLabel id="reservations" value="#{detailCustomerPackage.travelPackage.feasibleReservations}" />
						
			<h:outputLabel for="description" value="Description: "></h:outputLabel>
			<p:outputLabel id="description" value="#{detailCustomerPackage.travelPackage.description}" label="Description" />

			<h:outputLabel for="start" value="Begin date: "></h:outputLabel>
			<p:outputLabel id="start" value="#{detailCustomerPackage.travelPackage.startTrip}" label="Start date" >
				<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="GMT+1"/>
			</p:outputLabel>

			<h:outputLabel for="end" value="End date: "></h:outputLabel>
			<p:outputLabel id="end" value="#{detailCustomerPackage.travelPackage.endTrip}" label="End date" >
				<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="GMT+1"/>
			</p:outputLabel>

			<h:outputLabel for="expiry" value="Expiry date: "></h:outputLabel>
			<p:outputLabel id="expiry" value="#{detailCustomerPackage.travelPackage.expiry}" label="Expiry date" >
				<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="GMT+1"/>
			</p:outputLabel>

			<h:outputLabel for="price" value="Base price: "></h:outputLabel>
			<p:outputLabel id="price" value="#{detailCustomerPackage.travelPackage.basePrice} €" label="Base price" />

			<h:outputLabel for="totalprice" value="Total price: "></h:outputLabel>
			<p:outputLabel id="totalprice" value="#{detailCustomerPackage.travelPackage.totalPrice} €" label="Total price" />

			<h:outputLabel for="type" value="Type: "></h:outputLabel>
			<p:outputLabel id="type" value="#{detailCustomerPackage.travelPackage.type}" label="Type" />
		</h:panelGrid>
		<br />
		<p:carousel value="#{detailCustomerPackage.travelPackage.hotels}" var="hotel" itemStyleClass="hotelItem"  
            effect="fade" headerText="Hotels" rendered="#{!empty detailCustomerPackage.travelPackage.hotels}" rows="2">  
    	<h:panelGrid columns="1" style="width:100%" cellpadding="5">  
        
        	<p:outputLabel value="Name: #{hotel.name}" />  
          
        	<p:outputLabel value="Rating: #{hotel.rating}" />  
          
        	<p:outputLabel value="Address: #{hotel.address}" />  
        
        	<table width="600">
        	<tr><td>
        	<p:outputLabel value="Description: #{hotel.description}" /> 
        	</td></tr>
        	</table>
        	
        	<p:outputLabel value="Begin date: " />
        	<p:outputLabel value="#{hotel.startTrip}" >
        		<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="GMT+1"/>
        	</p:outputLabel>
        
        	<p:outputLabel value="End date: " />
        	<p:outputLabel value="#{hotel.endTrip}" >
        		<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="GMT+1"/>
        	</p:outputLabel>
        	
        	<p:outputLabel value="Price: #{hotel.price} €" />  
    	</h:panelGrid>  
	</p:carousel>
	<br />
	<p:carousel value="#{detailCustomerPackage.travelPackage.transports}" var="transport" itemStyleClass="transportItem"  
            effect="fade" headerText="Transports" rendered="#{!empty detailCustomerPackage.travelPackage.transports}" rows="2">  
    	<h:panelGrid columns="1" style="width:100%" cellpadding="5">  
        
        	<p:outputLabel value="Company: #{transport.company}" />  
          
        	<p:outputLabel value="Departure city: #{transport.departureCity}" />  
          
        	<p:outputLabel value="Arrival city: #{transport.arrivalCity}" />  
        
        	<table width="600">
        	<tr><td>
        	<p:outputLabel value="Description: #{transport.description}" /> 
        	</td></tr>
        	</table>
        	
        	<p:outputLabel value="Begin date: " />
        	<p:outputLabel value="#{transport.startTrip}" >
        		<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="GMT+1"/>
        	</p:outputLabel>
        
        	<p:outputLabel value="End date: " />
        	<p:outputLabel value="#{transport.endTrip}" >
        		<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="GMT+1"/>
        	</p:outputLabel>
        	
        	<p:outputLabel value="Price: #{transport.price} €" />  
    	</h:panelGrid>  
	</p:carousel>
	<br />
	<p:carousel value="#{detailCustomerPackage.travelPackage.excursions}" var="excursion" itemStyleClass="excursionItem"  
            effect="fade" headerText="Excursions" rendered="#{!empty detailCustomerPackage.travelPackage.excursions}" rows="2">  
    	<h:panelGrid columns="1" style="width:100%" cellpadding="5">  
        
        	<p:outputLabel value="Organizer: #{excursion.organizer}" />  
          
        	<p:outputLabel value="Begin address: #{excursion.startAddress}" />  
          
        	<p:outputLabel value="Path Km: #{excursion.pathKm}" />  
        
        	<table width="600">
        	<tr><td>
        	<p:outputLabel value="Description: #{excursion.description}" /> 
        	</td></tr>
        	</table>
        	
        	<p:outputLabel value="Begin date: " />
        	<p:outputLabel value="#{excursion.startTrip}" >
        		<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="GMT+1"/>
        	</p:outputLabel>
        
        	<p:outputLabel value="End date: " />
        	<p:outputLabel value="#{excursion.endTrip}" >
        		<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="GMT+1"/>
        	</p:outputLabel>
        	
        	<p:outputLabel value="Price: #{excursion.price} €" />  
    	</h:panelGrid>  
	</p:carousel>
	</p:panel>
	<p:messages id="msgs"/>
	<br />
	<p:commandButton id="custimizeButton" value="Customize package" update="@form" action="#{detailCustomerPackage.customize()}" />
	<br />
	<br />
	<h:link value="Participate" outcome="participateTravelPackage" />
	</h:form>
</h:body>
</html>